package com.aloha.springframework.context.support;

/**
 * @author DaiZhiHeng
 * @description 使用XML方式进行配置的应用上下文
 * @date 2023/7/3 9:28
 */
public class ClassPathXmlApplicationContext extends AbstractXmlApplicationContext {

    private String[] location;

    public ClassPathXmlApplicationContext() {
    }

    /**
     * 从 XML 中加载 BeanDefinition，并刷新上下文
     */
    public ClassPathXmlApplicationContext(String... location) {
        this.location = location;
        refresh();
    }

    @Override
    protected String[] getConfigLocation() {
        return location;
    }
}
